/*
 * @(#)NewContentRepository.java $version 2012. 3. 8.
 *
 */

package com.mywep.myalimi.repository.content;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.mywep.myalimi.model.NewContent;

import com.nhncorp.lucy.spring.core.util.ExtendedMap;

/**
 * @author 한지웅
 */
public class NewContentRepository extends SqlMapClientDaoSupport {

	public int countByExample(ExtendedMap param) {
		return (Integer)getSqlMapClientTemplate().queryForObject("newContent.countByExample", param);
	}

	@SuppressWarnings("unchecked")
	public List<NewContent> selectByExample(ExtendedMap param) {
		return getSqlMapClientTemplate().queryForList("newContent.selectByExample", param);
	}

	public NewContent selectByPrimaryKey(NewContent param) {
		return (NewContent)getSqlMapClientTemplate().queryForObject("newContent.selectByPrimaryKey", param);
	}

	public Integer insert(NewContent param) {
		return (Integer)getSqlMapClientTemplate().insert("newContent.insert", param);
	}

	public Integer deleteByPrimaryKey(NewContent param) {
		return (Integer)getSqlMapClientTemplate().delete("newContent.deleteByPrimaryKey", param);
	}

}
